

# isinstance 和  type 的用法
class Dog:
    pass

L1 = [1, 2, 3, 4]
dog1 = Dog()
# 请问dog1 是列表类型的对象码？
print(isinstance(dog1, list))  # False
print(isinstance(dog1, Dog))  # True

D = type(dog1)
print(D is Dog)  # True

dog2 = type(dog1)()
print(dog2)  # dog2绑定小狗类型的对象


